package cn.itrip.dao;

import cn.itrip.DTO.ItripListCommentDTO;
import cn.itrip.DTO.ItripScoreCommentDTO;
import cn.itrip.entity.ItripComment;
import cn.itrip.vo.biz.ItripSearchCommentVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ItripCommentMapper extends BaseMapper<ItripComment> {
    List<ItripComment> getCommentByHotelId(Long hotelId);
    Integer getCommentIsOkCount(Long hotelId);
    Integer getCommentHavingImgCount(Long hotelId);
    List<ItripListCommentDTO> getCommentPageByHotelId(ItripSearchCommentVO itripSearchCommentVO);
    ItripScoreCommentDTO getAvgAndTotalScore(Long hotelId);
    Integer getItripCommentCountByMap(ItripSearchCommentVO itripSearchCommentVO) throws Exception;
    Long insertItripComment(ItripComment itripComment) throws Exception;
}
